<table class="table table-responsive" id="goods-table">
    <thead>
        <th>ID</th>
        <th>名称</th>
        <th>货号</th>
        <th>图片</th>
        <th>长</th>
        <th>宽</th>
        <th>大类</th>
        <th>工艺</th>
        <th>材质</th>
        <th>价格</th>
        <th>克重</th>
        <th>浏览量</th>
        <th>收藏数</th>
        <th>是否上架</th>
        <th>是否显价</th>
        <th>排序</th>
        <th colspan="3">操作</th>
    </thead>
    <tbody>
    @foreach($goods as $goods)
        <tr>
            <td>{!! $goods->id !!}</td>
            <td>{!! $goods->title !!}</td>
            <td>{!! $goods->sn !!}</td>
            <td>@tpic($goods->pic)</td>
            <td>{!! $goods->length !!}</td>
            <td>{!! $goods->wide !!}</td>
            <td>
                @if(isset($goods->category))
                    {!! $goods->category->parent?$goods->category->parent->title.'-':'' !!}{!! $goods->category->title !!}
                @endif
            </td>
            <td>{!! $goods->technology !!}</td>
            <td>{!! $goods->texture !!}</td>
            <td>{!! $goods->price !!}</td>
            <td>{!! $goods->gram_weight !!}</td>
            <td>{!! $goods->read_num !!}</td>
            <td>{!! $goods->like_num !!}</td>
            <td>{!! $goods->on_sell==1?'上架':'下架' !!}</td>
            <td>{!! $goods->show_price==1?'显示':'不显示' !!}</td>
            <td>{!! $goods->sort !!}</td>
            <td>
                {!! Form::open(['route' => ['goods.destroy', $goods->id], 'method' => 'delete']) !!}
                <div class='btn-group'>
{{--                    <a href="{!! route('goods.show', [$goods->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>--}}
                    <a href="{!! route('goods.edit', [$goods->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
                    {!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}
                </div>
                {!! Form::close() !!}
            </td>
        </tr>
    @endforeach
    </tbody>
</table>